package com.xiaotu.code.service.person;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.xiaotu.code.dao.person.PsnDao;
import com.xiaotu.code.model.person.Psn;

/**
 * 用户.
 * @author chenxiangrong
 *
 */
@Service("psnService")
@Transactional(rollbackFor=Exception.class)
public class PsnServiceImpl implements PsnService {
	protected Logger logger = LoggerFactory.getLogger(this.getClass());
	@Autowired
	private PsnDao psnDao;

	public Psn login(String name) throws Exception {
		try {
			logger.info("service日志测试");
			Psn psn = this.psnDao.findPsnByName(name);
			return psn;// 成功
		} catch (Exception ex) {
			ex.printStackTrace();
			throw new Exception(ex);
		}
	}

	@Override
	public void testJms() throws Exception {
		
	}

}
